package com.kw.websocketdemoserver;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class MyTask {
    @Autowired
    SimpMessagingTemplate simpMessagingTemplate;
    @PostConstruct
    public void work() throws InterruptedException {
//        while (true){
//
//            simpMessagingTemplate.convertAndSendToUser("11", "/remind", "sss");
//            Thread.sleep(500);
//        }


    }
}